<?php
header("Content-Type:text/html;charset=utf-8");
$servername="127.0.0.1";
$username="root";
$password="";

$conn = new mysqli($servername,$username,$password);


if ($conn->connect_errno){
    die("连接失败:".$conn->connect_errno);
}
echo '连接成功';
 
?>